<?php
namespace app\admin\model;use think\Db;

class Order extends \think\Model
{     //订单状态
    function order_type(){        return array('1'=>'待付款','2'=>'确认打款','3'=>'已付款','4'=>'待收款','5'=>'确认收款','6'=>'已完成','0'=>'已取消');    }    //订单信息查询    function order_info($order_id){        return  Db::name('order')->where('order_id',$order_id)        ->field('uid,seller_id,total_amount,status,order_type')->find();    }    //订单日志记录    function order_log($order_id,$content){        $data = ['order_id'=>$order_id,'content'=>$content,'time'=>time(),];        return  Db::name('orderlog')->insert($data);    }
}
